package com.zougen202301180355.restaurant.mapper;

import com.zougen202301180355.restaurant.pojo.OrderDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderDetailsMapper {
    void insert(OrderDetail orderDetail);
    void delete(@Param("id") Integer id);
    void update(OrderDetail orderDetail);
    OrderDetail selectById(@Param("id") Integer id);
    List<OrderDetail> selectAll();
    List<OrderDetail> selectByOrderId(@Param("orderId") Integer orderId);
    
    // 关联查询：订单详情关联菜单项（一对多）
    List<OrderDetail> selectWithMenuItem(@Param("orderId") Integer orderId);
}